package com.jason.mychartstest.permistion;

import android.content.Context;
import android.support.v4.content.ContextCompat;

public class PermissionsChecker {
    private static final String TAG = ("DEBUG-WCL: " + PermissionsChecker.class.getSimpleName());
    private final Context mContext;

    public PermissionsChecker(Context context) {
        this.mContext = context.getApplicationContext();
    }

    private boolean lacksPermission(String str) {
        return ContextCompat.checkSelfPermission(this.mContext, str) == -1;
    }

    public boolean lacksPermissions(String... strArr) {
        for (String lacksPermission : strArr) {
            if (lacksPermission(lacksPermission)) {
                return true;
            }
        }
        return false;
    }
}